package com.nabi.library.contents.elements.style
{
	import flash.display.CapsStyle;
	import flash.display.Graphics;
	import flash.display.JointStyle;
	
	public class SolidStroke implements IStroke
	{
		private var m_thickness:Number;
		private var m_color:int;
		private var m_alpha:Number;
		private var m_pixelHinting:Boolean;
		private var m_scaleMode:String;
		private var m_caps:String;
		private var m_joints:String;
		private var m_miterLimit:Number;
		
		public function SolidStroke($thickness:Number = NaN, $color:int = 0, $alpha:Number = 1.0, $pixelHinting:Boolean = false,
									$scaleMode:String = "none", $caps:String = CapsStyle.NONE, $joints:String = JointStyle.MITER, $miterLimit:Number = 3)
		{
			m_thickness = $thickness;
			m_color = $color;
			m_alpha = $alpha;
			m_pixelHinting = $pixelHinting;
			m_scaleMode = $scaleMode;
			m_caps = $caps;
			m_joints = $joints;
			m_miterLimit = $miterLimit;
		}
		
		public function Draw($graphic:Graphics):void
		{
			if(isNaN(m_thickness)) return;
			
			$graphic.lineStyle(m_thickness, m_color, m_alpha, m_pixelHinting, m_scaleMode, m_caps, m_joints, m_miterLimit);
		}
		
		public function GetThickness():Number { return m_thickness; }
		
		public function SetThickness($thickness:Number): void { m_thickness = $thickness; }
		
		public function GetColor():int { return m_color; }
		
		public function SetColor($color:int): void { m_color = $color; }
		
		public function GetAlpha():Number { return m_alpha; }
		
		public function SetAlpha($alpha:Number): void { m_alpha = $alpha; }
		
		public function GetPixelHinting(): Boolean { return m_pixelHinting; }
		
		public function SetPixelHinting($pixelHinting:Boolean): void { m_pixelHinting = $pixelHinting; }
		
		public function GetScaleMode(): String { return m_scaleMode; }
		
		public function SetScaleMode($scaleMode:String): void { m_scaleMode = $scaleMode; }
		
		public function GetCaps(): String { return m_caps; }
		
		public function SetCaps($caps:String): void { m_caps = $caps; }
		
		public function GetJoints():String { return m_joints; }
		
		public function SetJoints($joints:String): void { m_joints = $joints; }
		
		public function GetMiterLimit(): Number { return m_miterLimit; }
		
		public function SetMiterLimit($miterLimit:Number): void { m_miterLimit = $miterLimit; }
	}
}